import    {createStore}  from 'redux'

const reducer=(state=0,action)=>{
    switch (action.type) {
        case "ADD":
            return state+1


            case "UNADD":
                return state-action.num
            
        
    
        default:


        return  state
           
    }
}

const store=createStore(reducer)



export  default store
